import { INCREMENT, SUBTRACT, INCRMENTASYNC } from "./action-types"

export const increment = function (number) {
	return {
		type: INCREMENT,
		data: number
	}
}

export const subtract = function (number) {
	return {
		type: SUBTRACT,
		data: number
	}
}
export const incrementAsync = (number) => dispatch => (
	setTimeout(() => {
		dispatch(increment(number))
	}, 1000)
) 